package com.zretc.support.service;

import com.zretc.support.entity.Question;
import com.zretc.support.tool.PageData;

import java.util.Date;

/**
 * 问题表
 * author 陈雄伟
 */
public interface QuestionSerive {

    /**
     * 模糊查询+分页
     * @param questionTitle
     * @param questionContent
     * @param startTime
     * @param endTime
     * @param page
     * @param size
     * @return
     */
    PageData<Question> getQuestionByLAP(String questionTitle, String questionContent, Date startTime, Date endTime, int page, int size);

    /**
     * 新增问题
     * @param question
     * @return
     */
    Question addQuestion(Question question);

    /**
     * 删除问题
     * @param questionId
     * @return
     */
    boolean deleteQuestion(Long questionId);

    /**
     * 修改问题
     * @param question
     * @return
     */
    boolean updateQuestion(Question question);

    /**
     * 根据id查询
     * @param QuestionId
     * @return
     */
    Question getQuestionById(long QuestionId);

    /**
     * 获取问题标题列表
     * @param page
     * @param size
     * @return
     */
    PageData<Question> getQuestionTitleList(int page, int size);

}
